<%
var headerPart = {
%>
<style>
	html{background-color: #fff!important;}
</style>
<% }; %>
<% layout("/layouts/micro.html",{headerSection:headerPart}){ %>
<div class="childrenBody">
	<div class="layui-tab-content">
		<form id="inputForm" action="${ctx}/sys/area/save" method="post" class="layui-form">
			<input type="hidden" name="id" value="${area.id}"/>
			<#message content="${message!}"/>
			<div class="layui-form-item">
				<label class="layui-form-label">上级区域：</label>
				<div class="layui-input-inline">
					<#treeselect id="area" name="parent.id" value="${area.parent.id!}" labelName="parent.name" labelValue="${area.parent.name!}"
						title="区域" url="/sys/area/treeData" extId="${area.id}" cssClass="" allowClear="true"/>
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">区域名称:</label>
				<div class="layui-input-inline">
					<input type="text" name="name" value="${area.name}" htmlEscape="false" maxlength="50" class="layui-input" lay-verify="required"/>
				</div>
				<div class="layui-form-mid "><font color="red">*</font> </div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">区域编码:</label>
				<div class="layui-input-inline">
					<input type="text" name="code" value="${area.code}" htmlEscape="false" maxlength="50" class="layui-input"/>
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">区域类型:</label>
				<div class="layui-input-inline">
					<select name="type">
						<#options items="${@DictUtils.getDictList('sys_area_type')}" value="${area.type}"/>
					</select>
				</div>
			</div>
			<div class="layui-form-item layui-form-text">
				<label class="layui-form-label">备注:</label>
				<div class="layui-input-block">
					<textarea name="remarks" htmlEscape="false" rows="3" maxlength="200" class="layui-textarea">${area.remarks}</textarea>
				</div>
			</div>
			<div class="layui-form-item layui-hide">
				<div class="layui-input-block">
					<%if(shiro.hasPermission("sys:area:edit")){%>
						<button class="layui-btn" lay-filter="areaForm" id="areaForm" lay-submit>保 存</button>
					<%}%>
					<button type="reset" class="layui-btn layui-btn-primary" onclick="history.go(-1)">返回</button>
				</div>
			</div>
		</form>
	</div>
</div>
<script>
    layui.use(['form','laydate'], function(){
        var form = layui.form,laydate = layui.laydate;
        form.render();
    });
</script>
<%}%>